package com.weifangfirecontrolformal.weifangfirecontrolformal.web.web.internetofthings.firefightingiot;

import cn.hutool.json.JSONObject;
import com.weifangfirecontrolformal.weifangfirecontrolformal.common.base.BaseController;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.annotaion.Action;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.annotaion.At;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.model.RespEntity;
import com.weifangfirecontrolformal.weifangfirecontrolformal.web.service.internetofthings.firefightingiot.WeChatService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.annotation.Resource;

/**
 * @author Yang yu
 * @version 1.0
 * @date 2020/7/21 17:57
 */
@Action
@RequestMapping(value="fireFightingIOT/weChat")
public class WeChatController extends BaseController {
    @Resource
    private WeChatService weChatService;
    /**
     * 微信code
     * @param jsonParam
     * @return
     */
    @At(value = "weChatCode", method = RequestMethod.POST)
    public RespEntity getItemSetupList(@RequestBody(required = false) JSONObject jsonParam) {
         return weChatService.weChatCode(jsonParam);
    }
}
